// Hook.h: interface for the Hook class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_HOOK_H__D47D242D_CE58_465B_AE16_605A3835AD95__INCLUDED_)
#define AFX_HOOK_H__D47D242D_CE58_465B_AE16_605A3835AD95__INCLUDED_

#if _MSC_VER > 1000

#pragma once
#endif // _MSC_VER > 1000
#include "stdafx.h"

class Hook  
{
public:
	Hook();
	virtual ~Hook();
	//get & set map of keys to GaiJian
	MapKeys* getMapKeys();
	void setMapKeys(MapKeys mks);
	//get previous key pressed
	int getPreKey();
protected:
	//init Hook
	int initHook();
	//uninstall Hook
	void unHook();
	//callback procedure
	static LRESULT CALLBACK callbackProc (int nCode, WPARAM wParam, LPARAM lParam);
private:
	static bool end;
	static bool home;
	static bool enterControl;
	static HHOOK kbHook;
	//map of keys to GaiJian
	static MapKeys mapKeys;
	//previous key pressed
	static int preKey;
};

#endif // !defined(AFX_HOOK_H__D47D242D_CE58_465B_AE16_605A3835AD95__INCLUDED_)
